﻿using IMES.Common.Domain.KeepModel;
using System.ComponentModel.DataAnnotations;

namespace Keep.API.Common.L.Dtos
{
	/// <summary>
	/// 工单列表
	/// </summary>
	public class workSheetListDto
	{
		/// <summary>
		/// 工单ID
		/// </summary> 
		public int WorkSheetId { get; set; }
		/// <summary>
		/// 工单编号
		/// </summary>
		[MaxLength(50)]
		public string WorkSheetNumber { get; set; }
		/// <summary>
		/// 产品编号
		/// </summary> 
		public string ProductNumber { get; set; }
		/// <summary>
		/// 产品名称
		/// </summary>
		public string? ProductName { get; set; }
		/// <summary>
		/// 产品规格
		/// </summary>
		public string? ProductStandard { get; set; }
		/// <summary>
		/// 产品单位
		/// </summary>
		public int ProductUnit { get; set; }
		/// <summary>
		/// 产品相关单据
		/// </summary>
		public string? ProductRelatedDocuments { get; set; }
		/// <summary>
		/// 计划数
		/// </summary>
		[Range(0, int.MaxValue)]
		public int Numberofpackages { get; set; } 
		/// <summary>
		/// 状态
		/// </summary>
		public WorkSheetState State { get; set; }
		/// <summary>
		/// 备注
		/// </summary>
		public string? Remark { get; set; } 
		/// <summary>
		/// 任务编号
		/// </summary>
		public string TaskIds { get; set; }
		/// <summary>
		/// 任务编号
		/// </summary>
		public int TaskId { get; set; }
		/// <summary>
		/// 工艺编号
		/// </summary>
		public string? ProcessNumber { get; set; } 
        /// <summary>
        /// 工序名称
        /// </summary>
        public string? ProcessName { get; set; }
		/// <summary>
		/// 报工权限
		/// </summary>
		public int? ReportingAuthority { get; set; }
		//将工单下单的单位与实际生产单位进行匹配和转换的比例。例如，如果工单的单位是千克，而实际生产过程中的单位是件，那么就需要一个配比来表示1千克等于多少件
		/// <summary>
		/// 报工数配比
		/// </summary>
		public int Matching { get; set; }
		/// <summary>
		/// 不良品项列表
		/// </summary>
		public string? AdverseList { get; set; }

		/// <summary>
		/// 计划开始时间
		/// </summary> 
		public DateTime? ScheduledStartTime { get; set; }
		/// <summary>
		/// 计划结束时间
		/// </summary> 
		public DateTime? ScheduledEndTime { get; set; } 
		/// <summary>
		/// 实际数量
		/// </summary>
		public int RealQuantity { get; set; }
		/// <summary>
		/// 计划良品数
		/// </summary>
		public int GoodScore { get; set; }
		/// <summary>
		/// 不良品数量
		/// </summary>
		public int DefectiveQuantity { get; set; }
		/// <summary>
		/// 报工时长
		/// </summary>
		public int ActualTime { get; set; }
		/// <summary>
		///实际开始时间
		/// </summary> 
		public DateTime? ActualStartTime { get; set; }
		/// <summary>
		/// 实际结束时间
		/// </summary> 
		public DateTime? ActualEndTime { get; set; }
		/// <summary>
		/// 创建人
		/// </summary>
		public int CreateId { get; set; }
		/// <summary>
		/// 创建人名
		/// </summary>
		public string CreateName { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreateDate { get; set; }
		/// <summary>
		/// 状态
		/// </summary>
		public TaskState TaskState { get; set; }

		/// <summary>
		/// 修改人名
		/// </summary>
		public string? UpdateName { get; set; }
		/// <summary>
		/// 修改时间
		/// </summary>
		public DateTime? UpdateDate { get; set; }


	}
}
